{#if boundingBox}
{/if}
{#if result !== undefined}
{ if (closeTimeoutHandle) { clearTimeout(closeTimeoutHandle); closeTimeoutHandle = undefined; } result = undefined; manualRegistrationCode = ''; }}>
{/if}
{#if errorWhileVerifying !== ''}

Impossible de scanner cet évènement

Assure-toi d'être manager de l'évènement

{:else if result === undefined}

Prêt à scanner

{:else if result.state === RegistrationVerificationState.NotFound}

Billet invalide

{:else if result.registration} {@const { authorIsBeneficiary, author, authorEmail, beneficiary, paymentMethod, ticket } = result.registration} {@const ok = result.state === RegistrationVerificationState.Ok}
{#if authorIsBeneficiary}

{#if author} {author.firstName} {author.lastName} {:else} {authorEmail} {/if}

{:else}

{beneficiary}

{#if ok}

Achetée par {#if author}{author.firstName} {author.lastName}{:else}{authorEmail}{/if}

{/if} {/if} {#if ok}

Payée via {DISPLAY_PAYMENT_METHODS[paymentMethod ?? 'Other']}

{:else if result.state === RegistrationVerificationState.Opposed}

En opposition

{#if result.registration?.opposedAt && result.registration?.opposedBy} {@const { opposedAt, opposedBy } = result.registration}

Opposée par {opposedBy.fullName} {#if isToday(opposedAt)}à {format(opposedAt, 'HH:mm')}{:else}le {formatDateTime( opposedAt, )}{/if}

{/if} {:else if result.state === RegistrationVerificationState.NotPaid}

Non payée

{:else if result.state === RegistrationVerificationState.OtherEvent}

Mauvais évènement

Cette réservation est pour l'évènement {result.registration.ticket.event.title}

{:else if result.state === RegistrationVerificationState.AlreadyVerified}

Déjà vérifiée

{#if result.registration?.verifiedAt && result.registration?.verifiedBy} {@const { verifiedAt, verifiedBy } = result.registration}

par {verifiedBy.fullName} {#if isToday(verifiedAt)}à {format(verifiedAt, 'HH:mm')}{:else}le {formatDateTime( verifiedAt, )}{/if}

{/if} {/if}
Billet {#if ticket.group} {ticket.group.name} {/if} {ticket.name}
{#if result?.registration && result.state === RegistrationVerificationState.NotPaid}
{ const registration = result?.registration; if (!registration) return; await $zeus.mutate({ upsertRegistration: [ { id: result?.registration?.id, ticketId: registration.ticket.id, paid: true, beneficiary: result?.registration?.beneficiary, paymentMethod: result?.registration?.paymentMethod, }, { '...on Error': { message: true, }, '...on MutationUpsertRegistrationSuccess': { data: { paid: true, }, }, }, ], }); await check(registration.id); }}>Payée
{/if}
{/if}
{ code = 'r:' + manualRegistrationCode.replace(/^r:/, '').trim().toLowerCase(); await check(code); }} >
{ showCameraSettings = !showCameraSettings; }} >{#if showCameraSettings} {:else} {/if}
{ enteringManualCode = true; }} on:blur={() => { enteringManualCode = false; }} label="" placeholder="Code de réservation" bind:value={manualRegistrationCode} /> Vérifier